﻿using System;

namespace CC.Yacht.Exceptions
{
    public class YachtException : Exception
    {
        #region Constructor
        public YachtException(ErrorType errorType) : this(errorType, errorType.ToStringEx())
        {
            // Empty constructor
        }

        public YachtException(ErrorType errorType, string message) : base(message)
        {
            ErrorType = (errorType == ErrorType.None) ? ErrorType.Unknown : errorType;
        }
        #endregion

        #region Public Properties
        public ErrorType ErrorType { get; protected set; }
        #endregion
    }
}
